$(function(){
  //热门排行
  $.ajax({
    method: 'get',
    url: BigNew.index_rank,
    success: (res) => {
      const htmlStr = template('Popular',{list:res.data})
      $('.Popular_list').html(htmlStr)
      $('.ranking').eq(0).addClass('first')
      $('.ranking').eq(1).addClass('second')
      $('.ranking').eq(2).addClass('third')
    }
  })
  //最新评论
  $.ajax({
    method: 'get',
    url: BigNew.index_latest_comment,
    success: (res) => {
      // console.log(res.data);
      const htmlStr = template('comment',{list:res.data})
      $('.comment_list').html(htmlStr)
    }
  })
  // 焦点关注
  $.ajax({
    method: 'get',
    url: BigNew.attention,
    success: (res) => {
      // console.log(res.data);
      const htmlStr = template('focus',{list:res.data})
      $('.guanzhu_list').html(htmlStr)
    }
  })
  //最新资讯
  $.ajax({
    method: 'get',
    url: BigNew.index_latest,
    success: (res) => {
      const htmlStr = template('information',{list:res.data})
      $('.setfr').html(htmlStr)
    }
  })
  // 全部分类
  $.ajax({
    method: 'get',
    url: BigNew.category_list,
    success: (res) => {
      const htmlStr = template('classify',{list:res.data})
    $('.level_two').html(htmlStr)
    $('.left_menu').html(htmlStr)
    }
  })
})  